package com.software.project.exception;

import com.software.project.domain.Result;
import com.software.project.utils.ResultUtil;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class BizExceptionHandler {

    @ExceptionHandler(BizException.class)
    public Result handlerException(BizException e) {
        return ResultUtil.error("500", e.getMessage(), null);
    }
}
